<script>
    var cookieValue = "some value with special characters;";
 
 document.cookie = "key=" + encodeURIComponent(cookieValue) + "; expires=Thu, 18 Dec 2025 12:00:00 UTC; path=/";
 </script>
<?php

var_dump($_COOKIE);
